From c6386a7eecd4844c5e512ab5e7dca0fdeea0fdf5 Mon Sep 17 00:00:00 2001 From: Yang Zhang Date: Thu, 2 Jun 2011 17:42:03 +0100 Subject: [PATCH] libxl: fix wrong mask of function number Function number is 3 bits. So the mask should be 0x7 instead 0x3. Signed-off-by: Yang Zhang Acked-by: Ian Jackson Committed-by: Ian Jackson --- tools/libxl/libxl_pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/libxl/libxl_pci.c b/tools/libxl/libxl_pci.c index 55f199cc49..5b01b7696e 100644 --- a/tools/libxl/libxl_pci.c +++ b/tools/libxl/libxl_pci.c @@ -48,7 +48,7 @@ static unsigned int pcidev_encode_bdf(libxl_device_pci *pcidev) value = 0; value |= (pcidev->bus & 0xff) << 16; value |= (pcidev->dev & 0x1f) << (8+3); - value |= (pcidev->func & 0x3) << (8+0); + value |= (pcidev->func & 0x7) << (8+0); return value; } -- 2.30.2